feat: add dynamic open graph metadata for link previews - #5348
Open
imrja8 wants to merge 9 commits into
Open
Conversation
imrja8
marked this pull request as draft
September 4, 2026 17:15
imrja8
marked this pull request as ready for review
September 4, 2026 17:22
Collaborator
|
@imrja8 Please, recreate the migration |
Contributor
Author
Done. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why needed?
Currently, direct links to a Dokploy instance render generic, unbranded previews, breaking the enterprise white-label experience. See issue #5346 for full details on the problem.
How solving?
We resolve this by dynamically injecting Open Graph
<meta>tags during Next.js Server-Side Rendering (_document.tsx).metaTitlewith anogImageUrlfield in thewebServerSettingsPostgreSQL schema.PublicWhitelabelingConfigtRPC service to expose the newogImageUrlto the frontend.Page Titleinput, unifying the site title with the coreApplication Nameto clean up the interface._document.tsx) to readappName,appDescription, andogImageUrlfrom the backend cache.<meta property="og:title">,og:description, andog:imagedynamically on the first paint to ensure social scrapers correctly fetch the custom branding.public/og.pngfallback image for instances without enterprise configurations.Validation
Social share and og things:
View Before & After
Before:

After:

Dashboard (only enterprise):
View UI Changes
UI Updates Implemented:
OG Image URLfield directly alongside the Favicon configuration, allowing enterprise users to fully control their link preview visuals.Page Titlefield from the settings dashboard. The<title>andog:titletags are now globally unified to derive directly from the primaryApplication Name, eliminating redundancy and cleaning up the user interface.Checklist
Before submitting this PR, please make sure that:
canarybranch.Issues related
closes #5346
Greptile Summary
This PR adds dynamic Open Graph metadata to the Next.js document shell and extends enterprise whitelabeling with a configurable preview image.
ogImageUrlacross the schema, API, dashboard, migration metadata, reset path, and tests.Confidence Score: 5/5
The PR appears safe to merge, with no outstanding correctness or security issue identified in the latest changes.
The reset payload now matches the renamed schema field, and the fallback Open Graph image is emitted as an absolute URL under the default proxy path. The earlier reset-payload thread was manually resolved without explanation; its current code is nevertheless fully corrected. The other previous finding is fully fixed by prefixing the fallback image path with the request origin.
Reviews (2): Last reviewed commit: "chore: revert accidental package.json ch..." | Re-trigger Greptile
Context used: